package com20230214;
import java.util.Scanner;
public class demo {
    public static void main(String[] args) {

        double s1 = inputScore("张三");

        double s2 = inputScore("李四");

        double s3 = inputScore("王五");

        System.out.println(s1 + ", " + s2 + ", " + s3);



    }

    static double inputScore(String name) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入" + name + "学生的成绩：");
        double score = sc.nextDouble();
        return score;
    }
}
